package com.groupbuying.storeinternal.service.impl;

import com.groupbuying.storeinternal.connector.SysconfigFeign;
import com.groupbuying.storeinternal.constants.CommonConstants;
import com.groupbuying.storeinternal.context.FilterContextHandler;
import com.groupbuying.storeinternal.dao.StoreCapitalVirtualAccountDetailDao;
import com.groupbuying.storeinternal.domain.StoreCapitalVirtualAccountDO;
import com.groupbuying.storeinternal.domain.StoreCapitalVirtualAccountDetailDO;
import com.groupbuying.storeinternal.service.StoreCapitalVirtualAccountDetailService;
import com.groupbuying.storeinternal.service.StoreMainInfoService;
import com.groupbuying.storeinternal.utils.MD5Utils;
import com.groupbuying.storeinternal.utils.PageUtils;
import com.groupbuying.storeinternal.utils.Query;
import com.groupbuying.storeinternal.utils.apiresult.ApiResult;
import com.groupbuying.storeinternal.utils.apiresult.ApiResultCode;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
public class StoreCapitalVirtualAccountDetailServiceImpl implements StoreCapitalVirtualAccountDetailService {
    private static Logger logger = LoggerFactory.getLogger(StoreCapitalVirtualAccountDetailServiceImpl.class);

    @Autowired
    private StoreCapitalVirtualAccountDetailDao storeCapitalVirtualAccountDetailDao;



    @Override
    public PageUtils getFinancialPwdList(Map<String, Object> params) {
        params.put("delflag", CommonConstants.COMMON_FLAG_UNDEL);
        params.put("providerId", FilterContextHandler.getName());
        Query query = new Query(params);
        List<Map<String,Object>> list = storeCapitalVirtualAccountDetailDao.getFinancialPwdList(query);
        int count = storeCapitalVirtualAccountDetailDao.countFinancialPwd(params);
        PageUtils pageUtil = new PageUtils(list, count);
        return pageUtil;
    }




}
